/****************************************/
/* Leg.h			 					*/
/* Created on: Sep 4, 2011				*/
/* Copyright Playsoft 2011				*/
/* Released under GPL v2				*/
/****************************************/

#ifndef LEG_H_
#define LEG_H_

//----------------------------------------------------------------------

#include <allegro.h>
#include <stdlib.h>

//----------------------------------------------------------------------

class Leg
{
	public:
		Leg(float gravity);
		virtual ~Leg();

	public:
		static void init();
		static void clear();

	private:
		static BITMAP *legBitmap;

	public:
		float locationX, locationY;

	private:
		float speedY;
		float gravity;

	private:
		bool isHit;

	public:
		void update(float growSpeed);
		void draw(BITMAP *buffer);

	public:
		void hit();
		bool getHit();
};

//----------------------------------------------------------------------

#endif
